<style type="text/css">
.storelogo img{width:3.2rem;height:3.2rem}
.merchgroup .store-star {padding:0.1rem 0 0.2rem 0;font-size:0.55rem;line-height:1rem}
.merchgroup .store-star img{height:0.66rem}
.star-on,.star-off{position:absolute;top:1rem;left:0;overflow:hidden}
.star-rate {margin-left:0.2rem;color:#19b955}
.store-distance{float:right;color:#999}
.store-moneylimit{font-size:0.55rem}
.delete{color: #bebebe;text-decoration:line-through;font-size:0.55rem}
</style>
<div class="fui-page fui-page-current" style="background:#fff">
	<div class="fui-content">
		<div class="fui-cell-group fui-cell-click" style="margin-top:0">
				<div class="fui-cell">
					<div class="fui-cell-info">
						<div class="fui-cell-info text bold" style="font-size:1.2rem;color:#333">果树</div>
					</div>
				</div>
				<div class="fui-tab fui-tab-danger" style="font-size:0.65rem">
					<a ng-class="{'external':1,' active':pagedata.params.isimg == 0}" href="javascript:" ng-click="pagedata.params.isimg=0;tool.get_list('jy_newnong/worker_guoshu/list/',true)">未拍照</a>
					<a ng-class="{'external':1,' active':pagedata.params.isimg == 1}" href="javascript:" ng-click="pagedata.params.isimg=1;tool.get_list('jy_newnong/worker_guoshu/list/',true)">已拍照</a>
				</div>
		</div>
		<div class="fui-cellone" style="padding-right:0.4rem;z-index: 108;top:0;background:#fff">
			 <div class="fui-cellone-info">
				<div class="search-input" style="height:1.6rem">
					<form action="javascript:return true">
					<i id="searchsub" class="icon icon-sousuo1 bold" ng-click="tool.get_list('jy_newnong/worker_guoshu/list/',true)" style="line-height: 1.7rem;"></i>
					<input type="search" placeholder="输入编号搜索" class="search" ng-model="pagedata.params.number" style="height:1.6rem;text-align: left; color: #999;border: 0 solid #ddd; font-size:0.6rem;background:#f9f9f9;border-radius: 1rem;" />
					</form>
				</div>
			 </div>
			 <div class="fui-cellone-remark noremark">
			 	<span style="margin-left:0.3rem;font-size: 0.75rem;" ng-click="tool.get_list('jy_newnong/worker_guoshu/list/',true)">搜索</span>
			 </div>
		</div>
		<div class="jy-content">
		<div ng-repeat="item in pagedata.list" class="fui-cell-group radius" style="padding:0.5rem">
				<div class="fui-cell" style="width:100%;background-color:#52ae89;border-radius: 0.2rem;color:#fff;text-align:left;padding:0.5rem">
					<div class="fui-cell-text" style="color:#fff;line-height:1.0rem">
						<div class="bold">{{item.animal.title}}</div>
						<div style="font-size:0.6rem">所属分类：{{item.animal.atitle}}</div>
					</div>
					<div class="fui-cell-remark noremark" style="color:#fff;line-height:1.0rem;border-left:1px solid #fff;padding-left:0.3rem">
						<div>{{item.number}}</div>
						<div style="font-size:0.6rem">编号</div>
					</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:3rem"><img style="border-radius:100%;width:50px;height:50px" ng-src="{{tomedia(item.animal.image) || '../core/resource/images/nopic.jpg'}}"  /></div>
					<div class="fui-cell-text">
						<div class="text bold">总购买：{{item.order.total}}棵<span class="red" style="padding-left:0.5rem;font-size:0.6rem">{{item.statustitle}}</span></div>
						<div class="text" style="color:#f60;font-size:0.60rem">周期：{{item.animal.growtime}}天</div>
						<div class="text" style="color:#f60;font-size:0.60rem">预计收获时间：{{item.animal.shouyue>0?item.animal.shouyue+'月':item.animal.shouday}}</div>
						<div class="text" style="color:#f60;font-size:0.60rem">预计回报：{{item.animal.shoukg}}KG / {{item.animal.shoufee ||0}}元</div>
						<div class="text" style="color:#f60;font-size:0.60rem">收获方式：{{item.animal.shoutypetitle}}</div>
						<div ng-if="item.shoukg>0" class="text bold" style="color:red;font-size:0.60rem">实际收获：{{item.shoukg}}KG</div>
						<div ng-if="item.order.sendtype==1 && item.order.address" class="subtitle towline" style="-webkit-line-clamp: 2;font-size:0.55rem">
							<span>寄送地址：{{item.order.address || '无'}}</span>
						</div>
					</div>
				</div>
				<div ng-if="item.imgs.length>0" class="fui-cell">
				<div class="fui-cell-text" style="margin-top:0">
					<div class="weui_uploader">
						<div class="weui_uploader_bd" href="javascript:;" ng-click="previewImage(item.imgs[0],item.imgs);">
							<ul class="weui_uploader_files">
								<li ng-repeat="p in item.imgs track by $index" class="weui_uploader_file" style="margin-bottom:0;background-image:url({{tomedia(p)}})"></li>
							</ul>
						</div>
					</div>
				</div>
				</div>
				<div class="fui-cell-title r" ng-if="item.status==0">
					<div class="btn btn-sm btn-success" href="javascript:" ng-click="post({},'jy_newnong/worker_guoshu/check/id='+item.id)">确认接单</div>
				</div>
				<div class="fui-cell-title r" ng-if="item.status==1 || item.status==2">
					<div ng-if="item.isshou==1" class="btn btn-sm btn-success" href="javascript:" ng-click="post({},'jy_newnong/worker_guoshu/status3/id='+item.id)">已成熟</div>
					<div ng-if="item.totype0!=1" class="btn btn-sm btn-success" href="javascript:" ng-click="post({},'jy_newnong/worker_guoshu/adopt/id='+item.id)">立即浇水</div>
					<div ng-if="item.totype0==1" class="btn btn-sm btn-default disabled">今日已浇水</div>
					<div ng-if="item.totype3!=1" class="btn btn-sm btn-success" href="javascript:" ng-click="post({},'jy_newnong/worker_guoshu/shifei/id='+item.id)">施肥</div>
					<div ng-if="item.totype3==1" class="btn btn-sm btn-default disabled">已施肥</div>
					<div ng-if="item.totype2!=1" class="btn btn-sm btn-success" href="javascript:" ng-click="post({},'jy_newnong/worker_guoshu/worm/id='+item.id)">除草</div>
					<div ng-if="item.totype2==1" class="btn btn-sm btn-default disabled">已除草</div>
					<div ng-if="item.totype1!=1" class="btn btn-sm btn-success" href="javascript:" ng-click="post({},'jy_newnong/worker_guoshu/weed/id='+item.id)">除虫</div>
					<div ng-if="item.totype1==1" class="btn btn-sm btn-default disabled">已除虫</div>
					<div class="btn btn-sm btn-danger-o" href="javascript:" ng-click="pagedata.upimage=true;pagedata.post.log_id=item.id;pagedata.post.images=item.imgs">拍照上传</div>
				</div>
				<div class="fui-cell-title r" ng-if="item.status==3 && item.animal.shoutype==0">
					<div class="btn btn-sm btn-success" href="javascript:" ng-click="pagedata.itemid=item.id;pagedata.gostatus4=true">收获成果</div>
				</div>
		</div>
		<div ng-if="pagedata.list.length<=0" class="content-empty">
			<i class='icon icon-chakanpingjia'></i>
			<div>暂无相关果树</div>
		</div>
		<div ng-show="pagedata.loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
		</div>
	</div>
</div>
<div ng-if="pagedata.gostatus4" class="popup">
	<div class="popup-body">
		<div class="popup-center" style="background:#fc6d60">
			<style>
				input{ caret-color: #fff}
				.fui-cell-group .fui-cell .fui-cell-info  ::-webkit-input-placeholder{
					color: #fff
				}
				.fui-cell-group .fui-cell .fui-cell-info {
					font-size: 0.85rem;
					color: #fff;
				}
			</style>
			<i class="closed icon icon-cuowu" ng-click="pagedata.gostatus4=false"></i>
			 <div class='fui-cell-group fui-cell-group-o' style="margin:0.5rem 2rem;padding-top:0.5rem;background:#fc6d60">
				<div class='fui-cell-title c' style="color:#fff">您正在进行[提交收获成果]操作
				</div>
				<div class='fui-cell'>
					<div class='fui-cell-label big' style='width:auto;color:#fff'><i class="icon icon-dixiaofei" style="font-size:0.8rem"></i></div>
					<div class='fui-cell-info'><input type='text' class='fui-input' placeholder="收获重量KG" ng-model="pagedata.post.shoukg"></div>
				</div>
			</div>
			<div class="weui_btn_area" style="margin:2rem;">
				<a class='weui_btn weui_btn_primary' style="border-radius:1rem;background-color:#fff;color:#fc6d60" ng-click="post({},'jy_newnong/worker_guoshu/status4/id='+pagedata.itemid+'&shoukg='+pagedata.post.shoukg)">确认提交</a>
			</div>
		</div>
	</div>
</div>
<div ng-if="pagedata.upimage" class="popup">
	<div class="popup-body">
		<div class="popup-bottom">
			<i class="closed icon icon-cuowu" ng-click="pagedata.upimage=false"></i>
			<div class='fui-content' style="padding:0.5rem">
				<div class="title bold">拍照上传 / <small>UP</small></div>
				<div class="tips tips-yellow">
						<i class="fa fa-bullhorn alert-link"></i> 请拍照上传果树等相关图片！
				</div>
				<div class="fui-cell">
					<div class="fui-cell-info">上传果树等相关图片</div>
				 </div>
				<div class="weui_cells weui_cells_form" style="margin-top:0">
								<div class="weui_cell" style="padding-top:0">
									<div class="weui_cell_bd weui_cell_primary">
										<div class="weui_uploader">
											<div class="weui_uploader_bd">
												<ul class="weui_uploader_files">
													<li ng-repeat="p in pagedata.post.images track by $index" class="weui_uploader_file" style="background-image:url({{tomedia(p)}})">
														<div class="upbtn" >
															<a style="color:#f60" href="javascript:;" ng-click="pagedata.post.images.splice($index-1,0,p);pagedata.post.images.splice($index+1,1)">上移</a>
															<a style="color:#f60" href="javascript:;" ng-click="pagedata.post.images.splice($index,1)">删除</a>
														</div>
													</li>
												</ul>
												<div class="weui_uploader_input_wrp" href="javascript:;" ng-click="images(pagedata.post,'images',true)">
												</div>
											</div>
										</div>
									</div>
								</div>
				</div>
				<div class="weui_btn_area">
				 <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" ng-click="post(pagedata.post,'/worker_guoshu/upimage/');">提交</a>
				 </div>
			</div>
		</div>
	</div>
</div>
<div ng-include="sys_html('_footer')"></div>
<script>
scope.tool.get_list('jy_newnong/worker_guoshu/list/',true);
	scope.pagedata.scroll_bottom=function(){
		scope.tool.get_list('jy_newnong/worker_guoshu/list/');
	}
</script>

